#include "Grass.h"
#include "Dot.h"

Grass :: Grass(Dot* dot)
{
	this->dot = dot;
	mapX = 0;
	mapY = 0;
}

void Grass :: process(Uint8* keys)
{
	mapX = dot->getY() / SIZEY;
	mapY = dot->getX() / SIZEX;
	if(Manager :: map[mapX][mapY] == -1)
	{
		Manager :: map[mapX][mapY] = 7;
	}
}

void Grass :: undo()
{
	Manager :: map[mapX][mapY] = -1;
}